babl: avoid negative degree when shrinking a zero polynomial
authorEll <ell_se@yahoo.com>
Sun, 24 Sep 2017 17:43:02 +0000 (13:43 -0400)
committerEll <ell_se@yahoo.com>
Sun, 24 Sep 2017 17:54:45 +0000 (13:54 -0400)
commit47a86a1a20b6289cfe11d993e0f381b6b5970449
treeec9d797101008e1b67d64d1b8458a19e282c6c8f
parent056cc862095ed2688c5b1d8d0d38ed4f904032aa
babl: avoid negative degree when shrinking a zero polynomial

When shrinking a zero polynomial, avoid trying to set its degree
to a negative value, and just keep it at 0, which is the minimal
degree we support.

Note that this also happens for polynomials whose coefficients are
all NaN, as is the case in bug 788093, so they also become zero
polynomials after shrinking, incidentally.
babl/babl-polynomial.c